<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const arr = [100, 60, 80]
    // const max = arr[0]
    // const min = arr[1]
    // const avg = arr[2]

    // 数组解构 赋值
    // let [max,min,avg] = arr
    // console.log(max,min,avg);
    // // 交换2个变量的值
    // let a = 1
    // let b = 2;
    // [a,b] = [b,a]
    // console.log(a,b);



    const pc=['海尔','联想','小米','方正']
    let [hr,lx,xm,fz] = pc
    console.log(hr,lx,xm,fz)

    function getValue(){
      return[100,60]
    }
    let [max,min]= getValue()
    console.log(max,min);
  </script>
</body>

</html>